Basis für p5.js
Zeichen
Mit p5.js können verschiedene Zeichen dargestellt werden. Da gibt arc(), ellipse(), circle(), line(), point(), quad(), rect(), square(), triangle() Funktionen.
Beispiel
arc(x, y, w, h, start, stop, [mode], [detail])
ellipse(x, y, w, [h])/ellipse(x, y, w, h, [detail])
circle(x, y, d), d=Diameter
line(x1, y1, x2, y2)/line(x1, y1, z1, x2, y2, z2)
point(x, y, [z])
quad(x1, y1, x2, y2, x3, y3, x4, y4)
rect(x, y, w, [h], [tl], [tr], [br], [bl]), tl=linksoben trim, tr=rechtsoben trim, br=rechtsunten trim, bl=linksunten trim
square(x, y, s, [tl], [tr], [br], [bl])
triangle(x1, y1, x2, y2, x3, y3)